
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>Provider-支付模块 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-back-to-top-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-anchors/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-sidebar-style/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-pageview-count/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-theme-comscore/test.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="3.Consumer-订单模块.html" />
    
    
    <link rel="prev" href="1.cloud架构选型.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    前言
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">基础篇</li>
        
        
    
        <li class="chapter " data-level="2.1" data-path="../java基础/IO流基础.html">
            
                <a href="../java基础/IO流基础.html">
            
                    
                    IO流基础
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="../java基础/集合.html">
            
                <a href="../java基础/集合.html">
            
                    
                    集合
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="../java基础/异常处理.html">
            
                <a href="../java基础/异常处理.html">
            
                    
                    异常处理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="../java基础/线程.html">
            
                <a href="../java基础/线程.html">
            
                    
                    线程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="../java基础/网络编程.html">
            
                <a href="../java基础/网络编程.html">
            
                    
                    网络编程
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">进阶篇</li>
        
        
    
        <li class="chapter " data-level="3.1" data-path="../java进阶/MySQL.html">
            
                <a href="../java进阶/MySQL.html">
            
                    
                    MySQL
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="../java进阶/Oracle.html">
            
                <a href="../java进阶/Oracle.html">
            
                    
                    Oracle
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="../java进阶/Redis.html">
            
                <a href="../java进阶/Redis.html">
            
                    
                    Redis
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.4" data-path="../java进阶/Netty.html">
            
                <a href="../java进阶/Netty.html">
            
                    
                    Netty
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.5" data-path="../java进阶/Spring.html">
            
                <a href="../java进阶/Spring.html">
            
                    
                    Spring
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.6" data-path="../java进阶/SpringMVC.html">
            
                <a href="../java进阶/SpringMVC.html">
            
                    
                    SpringMVC
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.7" data-path="../java进阶/单元测试.html">
            
                <a href="../java进阶/单元测试.html">
            
                    
                    SpringBoot单元测试
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.8" data-path="../java进阶/设计模式.html">
            
                <a href="../java进阶/设计模式.html">
            
                    
                    二十三个设计模式
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.8.1" data-path="../java进阶/工厂模式.html">
            
                <a href="../java进阶/工厂模式.html">
            
                    
                    工厂模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.8.2" data-path="../java进阶/单例模式.html">
            
                <a href="../java进阶/单例模式.html">
            
                    
                    单例模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.8.3" data-path="../java进阶/建造者模式.html">
            
                <a href="../java进阶/建造者模式.html">
            
                    
                    建造者模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.8.4" data-path="../java进阶/原型模式.html">
            
                <a href="../java进阶/原型模式.html">
            
                    
                    原型模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.8.5" data-path="../java进阶/适配器模式.html">
            
                <a href="../java进阶/适配器模式.html">
            
                    
                    适配器模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.8.6" data-path="../java进阶/责任链模式.html">
            
                <a href="../java进阶/责任链模式.html">
            
                    
                    责任链模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.8.7" data-path="../java进阶/桥接模式.html">
            
                <a href="../java进阶/桥接模式.html">
            
                    
                    桥接模式
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="header">高级篇</li>
        
        
    
        <li class="chapter " data-level="4.1" data-path="1.cloud架构选型.html">
            
                <a href="1.cloud架构选型.html">
            
                    
                    Spring Cloud
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="4.1.1" data-path="2.Provider-支付模块.html">
            
                <a href="2.Provider-支付模块.html">
            
                    
                    Provider-支付模块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.2" data-path="3.Consumer-订单模块.html">
            
                <a href="3.Consumer-订单模块.html">
            
                    
                    Consumer-订单模块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.3" data-path="4.重构-Common模块.html">
            
                <a href="4.重构-Common模块.html">
            
                    
                    重构-Common模块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.4" data-path="5.注册中心-Enreka.html">
            
                <a href="5.注册中心-Enreka.html">
            
                    
                    注册中心-Enreka
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.5" data-path="6.负载均衡-@LoadBalance.html">
            
                <a href="6.负载均衡-@LoadBalance.html">
            
                    
                    负载均衡-@LoadBalance
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.6" data-path="7.更换注册中心-Zookeeper.html">
            
                <a href="7.更换注册中心-Zookeeper.html">
            
                    
                    更换注册中心-Zookeeper
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.7" data-path="8.更换注册中心-Consul.html">
            
                <a href="8.更换注册中心-Consul.html">
            
                    
                    更换注册中心-Consul
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.8" data-path="9.负载均衡-Ribbon.html">
            
                <a href="9.负载均衡-Ribbon.html">
            
                    
                    负载均衡-Ribbon
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.9" data-path="10.服务调用-OpenFeign.html">
            
                <a href="10.服务调用-OpenFeign.html">
            
                    
                    服务调用-OpenFeign
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.10" data-path="11.熔断器-Hystrix.html">
            
                <a href="11.熔断器-Hystrix.html">
            
                    
                    熔断器-Hystrix
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.11" data-path="12.网关-Gateway.html">
            
                <a href="12.网关-Gateway.html">
            
                    
                    网关-Gateway
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.12" data-path="13.配置中心-Config.html">
            
                <a href="13.配置中心-Config.html">
            
                    
                    配置中心-Config
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.13" data-path="14.消息总线-bus.html">
            
                <a href="14.消息总线-bus.html">
            
                    
                    消息总线-Bus
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.14" data-path="15.消息驱动-stream.html">
            
                <a href="15.消息驱动-stream.html">
            
                    
                    消息驱动-Stream
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.15" data-path="16.链路监控-Sleuth.html">
            
                <a href="16.链路监控-Sleuth.html">
            
                    
                    链路监控-Sleuth
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.16" data-path="17.注册中心&配置中心-nacos.html">
            
                <a href="17.注册中心&配置中心-nacos.html">
            
                    
                    注册中心&配置中心-nacos
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.17" data-path="18.限流-sentinel.html">
            
                <a href="18.限流-sentinel.html">
            
                    
                    限流-sentinel
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="../java高级/JUC.html">
            
                <a href="../java高级/JUC.html">
            
                    
                    神秘的JUC包
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.3" data-path="../java高级/Docker.html">
            
                <a href="../java高级/Docker.html">
            
                    
                    Docker
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.4" data-path="../java高级/布隆过滤器.html">
            
                <a href="../java高级/布隆过滤器.html">
            
                    
                    布隆过滤器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.5" data-path="../java高级/Redission.html">
            
                <a href="../java高级/Redission.html">
            
                    
                    Redission
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.6" data-path="../java高级/MQ.html">
            
                <a href="../java高级/MQ.html">
            
                    
                    消息队列
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.7" data-path="../java高级/JVM.html">
            
                <a href="../java高级/JVM.html">
            
                    
                    JVM
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.8" data-path="../java书籍/《Effective Java》读书笔记.html">
            
                <a href="../java书籍/《Effective Java》读书笔记.html">
            
                    
                    《Effective Java》读书笔记 
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.8.1" data-path="../java书籍/创建和销毁对象.html">
            
                <a href="../java书籍/创建和销毁对象.html">
            
                    
                    创建和销毁对象
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="header">番外篇</li>
        
        
    
        <li class="chapter " data-level="5.1" data-path="../java面试/面试题.html">
            
                <a href="../java面试/面试题.html">
            
                    
                    面试题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="../番外篇/小程序.html">
            
                <a href="../番外篇/小程序.html">
            
                    
                    微信小程序
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >Provider-支付模块</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h3 id="1&#x65B0;&#x5EFA;&#x4E00;&#x4E2A;&#x5FAE;&#x670D;&#x52A1;&#x6A21;&#x5757;&#x4E00;&#x822C;&#x90FD;&#x9700;&#x8981;&#x54EA;&#x4E9B;&#x6D41;&#x7A0B;&#xFF1F;"><a name="1&#x65B0;&#x5EFA;&#x4E00;&#x4E2A;&#x5FAE;&#x670D;&#x52A1;&#x6A21;&#x5757;&#x4E00;&#x822C;&#x90FD;&#x9700;&#x8981;&#x54EA;&#x4E9B;&#x6D41;&#x7A0B;&#xFF1F;" class="plugin-anchor" href="#1&#x65B0;&#x5EFA;&#x4E00;&#x4E2A;&#x5FAE;&#x670D;&#x52A1;&#x6A21;&#x5757;&#x4E00;&#x822C;&#x90FD;&#x9700;&#x8981;&#x54EA;&#x4E9B;&#x6D41;&#x7A0B;&#xFF1F;"><i class="fa fa-link" aria-hidden="true"></i></a>1.&#x65B0;&#x5EFA;&#x4E00;&#x4E2A;&#x5FAE;&#x670D;&#x52A1;&#x6A21;&#x5757;&#x4E00;&#x822C;&#x90FD;&#x9700;&#x8981;&#x54EA;&#x4E9B;&#x6D41;&#x7A0B;&#xFF1F;</h3>
<ul>
<li><strong>&#x5EFA;module&#x3001;&#x6539;pom&#x3001;&#x5199;yml&#x3001;&#x4E3B;&#x542F;&#x52A8;&#x7C7B;&#x3001;&#x7F16;&#x5199;&#x4E1A;&#x52A1;&#x7C7B;</strong></li>
</ul>
<h3 id="2&#x65B0;&#x5EFA;payment&#x5FAE;&#x670D;&#x52A1;"><a name="2&#x65B0;&#x5EFA;payment&#x5FAE;&#x670D;&#x52A1;" class="plugin-anchor" href="#2&#x65B0;&#x5EFA;payment&#x5FAE;&#x670D;&#x52A1;"><i class="fa fa-link" aria-hidden="true"></i></a>2.&#x65B0;&#x5EFA;payment&#x5FAE;&#x670D;&#x52A1;</h3>
<ul>
<li><p><strong>new -&gt; module - &gt; pom.xml&#x9009;&#x9876;&#x7EA7;&#x7684;pom</strong></p>
</li>
<li><p><strong>&#x4FEE;&#x6539;&#x81EA;&#x8EAB;&#x6A21;&#x5757;&#x7684;pom.xml &#x5982;&#x4E0B;&#xFF1A;</strong></p>
</li>
</ul>
<pre><code class="lang-xml">  <span class="hljs-tag">&lt;<span class="hljs-name">dependencies</span>&gt;</span>
          <span class="hljs-comment">&lt;!--web--&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.springframework.boot<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>spring-boot-starter-web<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.springframework.boot<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>spring-boot-starter-actuator<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span>

          <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.mybatis.spring.boot<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>mybatis-spring-boot-starter<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>com.alibaba<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>druid-spring-boot-starter<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>mysql<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>mysql-connector-java<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.springframework.boot<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>spring-boot-starter-jdbc<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.springframework.boot<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>spring-boot-devtools<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">scope</span>&gt;</span>runtime<span class="hljs-tag">&lt;/<span class="hljs-name">scope</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">optional</span>&gt;</span>true<span class="hljs-tag">&lt;/<span class="hljs-name">optional</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.projectlombok<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>lombok<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">optional</span>&gt;</span>true<span class="hljs-tag">&lt;/<span class="hljs-name">optional</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.springframework.boot<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>spring-boot-starter-test<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">scope</span>&gt;</span>test<span class="hljs-tag">&lt;/<span class="hljs-name">scope</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span>

      <span class="hljs-tag">&lt;/<span class="hljs-name">dependencies</span>&gt;</span>
</code></pre>
<ul>
<li><strong>&#x65B0;&#x5EFA;application.yml</strong></li>
</ul>
<pre><code class="lang-yml"><span class="hljs-attr">  server:</span>
<span class="hljs-attr">    port:</span> <span class="hljs-number">8001</span>

<span class="hljs-attr">  spring:</span>
<span class="hljs-attr">    application:</span>
<span class="hljs-attr">      name:</span> payment
<span class="hljs-attr">    datasource:</span>
<span class="hljs-attr">      type:</span> com.alibaba.druid.pool.DruidDataSource
<span class="hljs-attr">      driver-class-name:</span> org.gjt.mm.mysql.Driver
<span class="hljs-attr">      url:</span> jdbc:mysql://localhost:<span class="hljs-number">3306</span>/bigdata?useUnicode=<span class="hljs-literal">true</span>&amp;characterEncoding=utf<span class="hljs-bullet">-8</span>&amp;useSSL=<span class="hljs-literal">false</span>
<span class="hljs-attr">      username:</span> root
<span class="hljs-attr">      password:</span> <span class="hljs-number">123456</span>

<span class="hljs-attr">  mybatis:</span>
<span class="hljs-attr">    mapper-locations:</span> classpath:mapper/*.xml
<span class="hljs-attr">    type-aliases-package:</span> com.xxxx.springcloud.entities  <span class="hljs-comment"># &#x6240;&#x5728;entity&#x522B;&#x540D;&#x7C7B;&#x6240;&#x5728;&#x5305;</span>
</code></pre>
<ul>
<li><p><strong>&#x65B0;&#x5EFA;&#x542F;&#x52A8;&#x7C7B;</strong></p>
<p>&#x5728;&#x5305;&#x7684;&#x6700;&#x5916;&#x5C42;&#xFF0C;&#x4E5F;&#x5C31;&#x662F;&#x5176;&#x4ED6;&#x6240;&#x6709;&#x7684;&#x7C7B;&#x7684;&#x4E0A;&#x4E00;&#x7EA7;</p>
</li>
</ul>
<pre><code class="lang-java">  <span class="hljs-comment">//&#x4E3A;&#x89E3;&#x51B3;&#x6BCF;&#x4E2A;mapper.java&#x4E0A;&#x9762;&#x52A0;@Mapper&#x9EBB;&#x70E6;,&#x8BE5;&#x6CE8;&#x89E3;&#x4F1A;&#x81EA;&#x52A8;&#x6CE8;&#x518C;&#x5305;&#x4E0B;&#x6240;&#x6709;mapper</span>
  <span class="hljs-meta">@SpringBootApplication</span>
  <span class="hljs-meta">@MapperScan</span>(<span class="hljs-string">&quot;com.xxx.springcloud.mapper&quot;</span>)
  <span class="hljs-keyword">public</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">PaymentMainApplication</span> </span>{

      <span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">void</span> <span class="hljs-title">main</span><span class="hljs-params">(String[] args)</span> </span>{
          SpringApplication.run(PaymentMainApplication.class,args);
      }
  }
</code></pre>
<ul>
<li><p><strong>&#x9006;&#x5411;&#x5DE5;&#x7A0B;</strong></p>
<p>&#x589E;&#x52A0; <u>src/main/java/generator/GeneratorMapper.xml</u></p>
</li>
</ul>
<pre><code class="lang-xml">  <span class="php"><span class="hljs-meta">&lt;?</span>xml version=<span class="hljs-string">&quot;1.0&quot;</span> encoding=<span class="hljs-string">&quot;UTF-8&quot;</span><span class="hljs-meta">?&gt;</span></span>
  <span class="hljs-meta">&lt;!DOCTYPE generatorConfiguration
          PUBLIC &quot;-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN&quot;
          &quot;http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd&quot;&gt;</span>

  <span class="hljs-tag">&lt;<span class="hljs-name">generatorConfiguration</span>&gt;</span>
      <span class="hljs-comment">&lt;!--********mysql&#x9A71;&#x52A8;&#x8DEF;&#x5F84; &#x9700;&#x4FEE;&#x6539;--&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">classPathEntry</span> <span class="hljs-attr">location</span>=<span class="hljs-string">&quot;/Users/bssm/Documents/mylib/mysql-connector-java-8.0.22.jar&quot;</span>/&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">context</span> <span class="hljs-attr">id</span>=<span class="hljs-string">&quot;testTables&quot;</span> <span class="hljs-attr">targetRuntime</span>=<span class="hljs-string">&quot;MyBatis3&quot;</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">commentGenerator</span>&gt;</span>
              <span class="hljs-comment">&lt;!-- &#x662F;&#x5426;&#x53BB;&#x9664;&#x81EA;&#x52A8;&#x751F;&#x6210;&#x7684;&#x6CE8;&#x91CA; true&#xFF1A;&#x662F; &#xFF1A; false:&#x5426; --&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">&quot;suppressAllComments&quot;</span> <span class="hljs-attr">value</span>=<span class="hljs-string">&quot;true&quot;</span>/&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">commentGenerator</span>&gt;</span>
          <span class="hljs-comment">&lt;!--&#x6570;&#x636E;&#x5E93;&#x8FDE;&#x63A5;&#x7684;&#x4FE1;&#x606F;&#xFF1A;&#x9A71;&#x52A8;&#x7C7B;&#x3001;&#x8FDE;&#x63A5;&#x5730;&#x5740;&#x3001;&#x7528;&#x6237;&#x540D;&#x3001;&#x5BC6;&#x7801; &#x9700;&#x4FEE;&#x6539;--&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">jdbcConnection</span> <span class="hljs-attr">driverClass</span>=<span class="hljs-string">&quot;com.mysql.cj.jdbc.Driver&quot;</span>
                          <span class="hljs-attr">connectionURL</span>=<span class="hljs-string">&quot;jdbc:mysql://***:3306/***&quot;</span>
                          <span class="hljs-attr">userId</span>=<span class="hljs-string">&quot;***&quot;</span>
                          <span class="hljs-attr">password</span>=<span class="hljs-string">&quot;***&quot;</span>&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">jdbcConnection</span>&gt;</span>

          <span class="hljs-comment">&lt;!-- &lt;jdbcConnection driverClass=&quot;oracle.jdbc.OracleDriver&quot; connectionURL=&quot;jdbc:oracle:thin:@127.0.0.1:1521:yycg&quot;
              userId=&quot;yycg&quot; password=&quot;yycg&quot;&gt; &lt;/jdbcConnection&gt; --&gt;</span>

          <span class="hljs-comment">&lt;!-- &#x9ED8;&#x8BA4;false&#xFF0C;&#x628A;JDBC DECIMAL &#x548C; NUMERIC &#x7C7B;&#x578B;&#x89E3;&#x6790;&#x4E3A; Integer&#xFF0C;&#x4E3A; true&#x65F6;&#x628A;JDBC DECIMAL
              &#x548C; NUMERIC &#x7C7B;&#x578B;&#x89E3;&#x6790;&#x4E3A;java.math.BigDecimal --&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">javaTypeResolver</span>&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">&quot;forceBigDecimals&quot;</span> <span class="hljs-attr">value</span>=<span class="hljs-string">&quot;false&quot;</span>/&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">javaTypeResolver</span>&gt;</span>

          <span class="hljs-comment">&lt;!-- targetProject:&#x751F;&#x6210;PO&#x7C7B;&#x7684;&#x4F4D;&#x7F6E; &#x9700;&#x4FEE;&#x6539;--&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">javaModelGenerator</span> <span class="hljs-attr">targetPackage</span>=<span class="hljs-string">&quot;***.entities&quot;</span> <span class="hljs-attr">targetProject</span>=<span class="hljs-string">&quot;src/main/java&quot;</span>&gt;</span>
              <span class="hljs-comment">&lt;!-- enableSubPackages:&#x662F;&#x5426;&#x8BA9;schema&#x4F5C;&#x4E3A;&#x5305;&#x7684;&#x540E;&#x7F00; --&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">&quot;enableSubPackages&quot;</span> <span class="hljs-attr">value</span>=<span class="hljs-string">&quot;false&quot;</span>/&gt;</span>
              <span class="hljs-comment">&lt;!-- &#x4ECE;&#x6570;&#x636E;&#x5E93;&#x8FD4;&#x56DE;&#x7684;&#x503C;&#x88AB;&#x6E05;&#x7406;&#x524D;&#x540E;&#x7684;&#x7A7A;&#x683C; --&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">&quot;trimStrings&quot;</span> <span class="hljs-attr">value</span>=<span class="hljs-string">&quot;true&quot;</span>/&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">javaModelGenerator</span>&gt;</span>

          <span class="hljs-comment">&lt;!-- targetProject:mapper&#x6620;&#x5C04;&#x6587;&#x4EF6;&#x751F;&#x6210;&#x7684;&#x4F4D;&#x7F6E; &#x9700;&#x4FEE;&#x6539;--&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">sqlMapGenerator</span> <span class="hljs-attr">targetPackage</span>=<span class="hljs-string">&quot;sqlMapper&quot;</span> <span class="hljs-attr">targetProject</span>=<span class="hljs-string">&quot;src/main/resources&quot;</span>&gt;</span>
              <span class="hljs-comment">&lt;!-- enableSubPackages:&#x662F;&#x5426;&#x8BA9;schema&#x4F5C;&#x4E3A;&#x5305;&#x7684;&#x540E;&#x7F00; --&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">&quot;enableSubPackages&quot;</span> <span class="hljs-attr">value</span>=<span class="hljs-string">&quot;false&quot;</span>/&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">sqlMapGenerator</span>&gt;</span>

          <span class="hljs-comment">&lt;!-- targetPackage&#xFF1A;mapper&#x63A5;&#x53E3;&#x751F;&#x6210;&#x7684;&#x4F4D;&#x7F6E; &#x9700;&#x4FEE;&#x6539;--&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">javaClientGenerator</span> <span class="hljs-attr">type</span>=<span class="hljs-string">&quot;XMLMAPPER&quot;</span> <span class="hljs-attr">targetPackage</span>=<span class="hljs-string">&quot;***.mapper&quot;</span> <span class="hljs-attr">targetProject</span>=<span class="hljs-string">&quot;src/main/java&quot;</span>&gt;</span>
              <span class="hljs-comment">&lt;!-- enableSubPackages:&#x662F;&#x5426;&#x8BA9;schema&#x4F5C;&#x4E3A;&#x5305;&#x7684;&#x540E;&#x7F00; --&gt;</span>
              <span class="hljs-tag">&lt;<span class="hljs-name">property</span> <span class="hljs-attr">name</span>=<span class="hljs-string">&quot;enableSubPackages&quot;</span> <span class="hljs-attr">value</span>=<span class="hljs-string">&quot;false&quot;</span>/&gt;</span>
          <span class="hljs-tag">&lt;/<span class="hljs-name">javaClientGenerator</span>&gt;</span>

          <span class="hljs-comment">&lt;!-- &#x6307;&#x5B9A;&#x6570;&#x636E;&#x5E93;&#x8868; --&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-name">table</span> <span class="hljs-attr">tableName</span>=<span class="hljs-string">&quot;payment&quot;</span> <span class="hljs-attr">domainObjectName</span>=<span class="hljs-string">&quot;Payment&quot;</span>/&gt;</span>
      <span class="hljs-tag">&lt;/<span class="hljs-name">context</span>&gt;</span>

  <span class="hljs-tag">&lt;/<span class="hljs-name">generatorConfiguration</span>&gt;</span>
</code></pre>
<ul>
<li><strong>&#x7F16;&#x5199;&#x81EA;&#x8EAB;&#x4E1A;&#x52A1;&#x7C7B;</strong></li>
</ul>
<p>&#x200B;        &#x65B0;&#x5EFA; controller&#x3001;service&#x3001;mapper&#x3001;entities &#x5305;/&#x6587;&#x4EF6;&#x5939;&#xFF1B;</p>
<p>&#x200B;        &#x8C03;&#x7528;&#x6570;&#x636E;&#x5E93;&#x5B9E;&#x73B0;&#x8BFB;/&#x5199;&#x529F;&#x80FD;&#x3002; </p>
<footer class="page-footer"><span class="copyright">Copyright &#xA9; mine 2022-2025 all right reserved&#xFF0C;powered by Gitbook</span><span class="footer-modification">&#x6587;&#x4EF6;&#x4FEE;&#x8BA2;&#x65F6;&#x95F4;&#xFF1A;
2022-07-05 16:41:43
</span></footer>
<script>console.log("plugin-popup....");document.onclick = function(e){ e.target.tagName === "IMG" && window.open(e.target.src,e.target.src)}</script><style>img{cursor:pointer}</style>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="1.cloud架构选型.html" class="navigation navigation-prev " aria-label="Previous page: Spring Cloud">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="3.Consumer-订单模块.html" class="navigation navigation-next " aria-label="Next page: Consumer-订单模块">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"Provider-支付模块","level":"4.1.1","depth":2,"next":{"title":"Consumer-订单模块","level":"4.1.2","depth":2,"path":"springcloud/3.Consumer-订单模块.md","ref":"springcloud/3.Consumer-订单模块.md","articles":[]},"previous":{"title":"Spring Cloud","level":"4.1","depth":1,"path":"springcloud/1.cloud架构选型.md","ref":"springcloud/1.cloud架构选型.md","articles":[{"title":"Provider-支付模块","level":"4.1.1","depth":2,"path":"springcloud/2.Provider-支付模块.md","ref":"springcloud/2.Provider-支付模块.md","articles":[]},{"title":"Consumer-订单模块","level":"4.1.2","depth":2,"path":"springcloud/3.Consumer-订单模块.md","ref":"springcloud/3.Consumer-订单模块.md","articles":[]},{"title":"重构-Common模块","level":"4.1.3","depth":2,"path":"springcloud/4.重构-Common模块.md","ref":"springcloud/4.重构-Common模块.md","articles":[]},{"title":"注册中心-Enreka","level":"4.1.4","depth":2,"path":"springcloud/5.注册中心-Enreka.md","ref":"springcloud/5.注册中心-Enreka.md","articles":[]},{"title":"负载均衡-@LoadBalance","level":"4.1.5","depth":2,"path":"springcloud/6.负载均衡-@LoadBalance.md","ref":"springcloud/6.负载均衡-@LoadBalance.md","articles":[]},{"title":"更换注册中心-Zookeeper","level":"4.1.6","depth":2,"path":"springcloud/7.更换注册中心-Zookeeper.md","ref":"springcloud/7.更换注册中心-Zookeeper.md","articles":[]},{"title":"更换注册中心-Consul","level":"4.1.7","depth":2,"path":"springcloud/8.更换注册中心-Consul.md","ref":"springcloud/8.更换注册中心-Consul.md","articles":[]},{"title":"负载均衡-Ribbon","level":"4.1.8","depth":2,"path":"springcloud/9.负载均衡-Ribbon.md","ref":"springcloud/9.负载均衡-Ribbon.md","articles":[]},{"title":"服务调用-OpenFeign","level":"4.1.9","depth":2,"path":"springcloud/10.服务调用-OpenFeign.md","ref":"springcloud/10.服务调用-OpenFeign.md","articles":[]},{"title":"熔断器-Hystrix","level":"4.1.10","depth":2,"path":"springcloud/11.熔断器-Hystrix.md","ref":"springcloud/11.熔断器-Hystrix.md","articles":[]},{"title":"网关-Gateway","level":"4.1.11","depth":2,"path":"springcloud/12.网关-Gateway.md","ref":"springcloud/12.网关-Gateway.md","articles":[]},{"title":"配置中心-Config","level":"4.1.12","depth":2,"path":"springcloud/13.配置中心-Config.md","ref":"springcloud/13.配置中心-Config.md","articles":[]},{"title":"消息总线-Bus","level":"4.1.13","depth":2,"path":"springcloud/14.消息总线-bus.md","ref":"springcloud/14.消息总线-bus.md","articles":[]},{"title":"消息驱动-Stream","level":"4.1.14","depth":2,"path":"springcloud/15.消息驱动-stream.md","ref":"springcloud/15.消息驱动-stream.md","articles":[]},{"title":"链路监控-Sleuth","level":"4.1.15","depth":2,"path":"springcloud/16.链路监控-Sleuth.md","ref":"springcloud/16.链路监控-Sleuth.md","articles":[]},{"title":"注册中心&配置中心-nacos","level":"4.1.16","depth":2,"path":"springcloud/17.注册中心&配置中心-nacos.md","ref":"springcloud/17.注册中心&配置中心-nacos.md","articles":[]},{"title":"限流-sentinel","level":"4.1.17","depth":2,"path":"springcloud/18.限流-sentinel.md","ref":"springcloud/18.限流-sentinel.md","articles":[]}]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["back-to-top-button","code","splitter","expandable-chapters-small","anchors","theme-comscore","tbfed-pagefooter","sidebar-style","pageview-count","popup"],"pluginsConfig":{"sidebar-style":{"author":"梁兴龙","title":"《Java 笔记本》"},"tbfed-pagefooter":{"copyright":"Copyright &copy mine 2022-2025","modify_label":"文件修订时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"splitter":{},"search":{},"popup":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"code":{"copyButtons":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-comscore":{},"back-to-top-button":{},"pageview-count":{},"expandable-chapters-small":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"springcloud/2.Provider-支付模块.md","mtime":"2022-07-05T08:41:43.520Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2022-08-22T03:22:22.085Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-back-to-top-button/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sidebar-style/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-pageview-count/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-theme-comscore/test.js"></script>
        
    

    </body>
</html>

